//
//  Content.h
//  coffee
//
//  Created by student4 on 2020/11/8.
//  Copyright © 2020 MOSAD. All rights reserved.
//

#ifndef Content_h
#define Content_h

#import <Foundation/Foundation.h>

@interface TextContent : NSObject
@property (nonatomic, retain) NSString *title;// 内容名字
@property (nonatomic, retain) NSString *detail;// 详情介绍
@property (nonatomic, retain) NSMutableArray<NSString*> *tags;// 标签（ObjectId）
@property (nonatomic, assign) BOOL isPublic;// 是否公开
@end

@interface File : NSObject
@property (nonatomic, retain) NSString *filepath;
@property (nonatomic, assign) NSInteger size;
@property (nonatomic, retain) NSString *title;
@property (nonatomic, assign) NSInteger time;
@property (nonatomic, assign) NSInteger count;
@property (nonatomic, retain) NSString *type;
// - (instancetype) initWith:(NSDictionary*)dict;
@end

@interface Image : NSObject
@property (nonatomic, assign) BOOL native;
@property (nonatomic, retain) File *file;
@property (nonatomic, retain) NSString *url;
@property (nonatomic, retain) NSString *thumb;
// - (instancetype) initWith:(NSDictionary*)dict;
@end

@interface AlbumContent : NSObject
@property (nonatomic, retain) NSMutableArray<Image*> *images;
@property (nonatomic, retain) NSString *title;
@property (nonatomic, assign) NSInteger time;
@property (nonatomic, retain) NSString *location;
// - (instancetype) initWith:(NSDictionary*)dict;
@end

@interface ContentFileReq : NSObject
@property (nonatomic, retain) NSString *contentID;
@property (nonatomic, retain) NSString *filePath;
@end

@interface Content : NSObject
@property (nonatomic, retain) NSString *ID;
@property (nonatomic, retain) NSString *OwnID;// 作者ID [索引]
@property (nonatomic, retain) NSString *OwnName;// 作者姓名
@property (nonatomic, retain) NSString *OwnAvatar;// 作者头像
@property (nonatomic, assign) NSInteger OwnGender;// 作者性别
@property (nonatomic, assign) NSInteger PublishDate;// 发布日期
@property (nonatomic, assign) NSInteger EditDate;// 修改日期
@property (nonatomic, assign) NSInteger LikeNum;// 点赞人数
@property (nonatomic, assign) NSInteger CommentNum;// 评论次数
@property (nonatomic, retain) NSString *Remarks;// 备注
@property (nonatomic, retain) NSString *Type;// 类型
@property (nonatomic, retain) TextContent *text;//文本内容
@property (nonatomic, retain) AlbumContent *album;//图片内容
- (instancetype) initWith:(NSDictionary*)dict;
@end
#endif /* Content_h */
